import request from '@/utils/request'

// 创建渠道单
export function createAppBiddingDetail(data) {
  return request({
    url: '/pekingfish/app-bidding-detail/create',
    method: 'post',
    data: data
  })
}

// 更新渠道单
export function updateAppBiddingDetail(data) {
  return request({
    url: '/pekingfish/app-bidding-detail/update',
    method: 'put',
    data: data
  })
}

// 删除渠道单
export function deleteAppBiddingDetail(id) {
  return request({
    url: '/pekingfish/app-bidding-detail/delete?id=' + id,
    method: 'delete'
  })
}

// 获得渠道单
export function getAppBiddingDetail(id) {
  return request({
    url: '/pekingfish/app-bidding-detail/get?id=' + id,
    method: 'get'
  })
}

// 获得渠道单分页
export function getAppBiddingDetailPage(query) {
  return request({
    url: '/pekingfish/app-bidding-detail/page',
    method: 'get',
    params: query
  })
}

// 导出渠道单 Excel
export function exportAppBiddingDetailExcel(query) {
  return request({
    url: '/pekingfish/app-bidding-detail/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
